﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MudEngine.Parsing.AST
{
    public class MapInitializerExpression : Expression
    {
        public List<Expression> Keys { get; private set; }
        public List<Expression> Values { get; private set; }

        public MapInitializerExpression()
        {
            this.Type = AType.TYPE_MAP;
            this.Keys = new List<Expression>();
            this.Values = new List<Expression>();
        }

        public void AddAssocPair(Expression key, Expression value)
        {
            this.Keys.Add(key);
            this.Values.Add(value);
        }

        public override void AcceptVisitor<C>(IAstNodeVisitor<C> visitor, C ctx)
        {
            visitor.VisitMapExpression(this, ctx);
        }
    }
}
